package com.hs.sfzy.service;

import com.hs.sfzy.entity.CourseCollect;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CourseCollectService {
    // 移除@Param注解，Service层无需MyBatis注解
    int insert(int userId, int courseId);
    int exists(int userId, int courseId);
    int updatePayStatus(int userId, int courseId, int isok);
    List<CourseCollect> selectWithRelations(int userId, int payStatus);
    int delete(Integer userId, Integer courseId);

    List<CourseCollect> getCourseCollectByUserId(Integer userId);

    // 添加课程收藏
    Integer addCourseCollect(CourseCollect courseCollect);

    // 把uid和cid增加到收藏表中
    Integer addCourseCollectByUidAndCid(Integer userId, Integer courseId);

    CourseCollect checkIsCollected( Integer userId, Integer courseId);
}
